package com.letu.mq.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @Description: 单个业务  死信
 */
@Slf4j
//@Component
@RocketMQMessageListener(topic = "%DLQ%${spring.application.name}-${spring.profiles.active}", consumerGroup = "DLQ-${spring.application.name}-${spring.profiles.active}",
        selectorExpression = "*",
        messageModel = MessageModel.CLUSTERING, consumeMode = ConsumeMode.ORDERLY)
public class DieBusinessPointListner implements RocketMQListener<String> {


    @Override
    public void onMessage(String message) {
        log.info("死信信息 is ： "+ message);
    }

}
